﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms; using Montana.Entidades;

namespace Montana
{
    public partial class ComboCustom : ComboBox
    {
        public ComboCustom()
        {
            InitializeComponent();

            this.BackColor = ControlesCustomConfig.GetColorFondo();
            this.ForeColor = ControlesCustomConfig.GetColorLetra();
        }

        private void ComboCustom_Enter(object sender, EventArgs e)
        {
            this.BackColor = ControlesCustomConfig.GetColorSelFondo();
            this.ForeColor = ControlesCustomConfig.GetColorSelLetra();
        }

        private void ComboCustom_Leave(object sender, EventArgs e)
        {
            this.BackColor = ControlesCustomConfig.GetColorFondo();
            this.ForeColor = ControlesCustomConfig.GetColorLetra();
        }

        private void ComboCustom_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (e.KeyChar == (char)13)
            {
                SendKeys.Send("{tab}");
                e.Handled = true;
            }
        }
    }
}
